<template>
  <div id="app">
    <TopNavBar />
    <div class="page-container">
      <router-view :key="$route.path"/>
    </div>
    <LoginModal/>
    <BackTop/>
  </div>
</template>

<script>
import TopNavBar from './components/TopNavBar.vue';
import BackTop from './components/BackTop/BackTop.vue';
import LoginModal from '@/components/modal/login/LoginModal.vue';

export default {
  name: 'App',
  components: {
    TopNavBar,
    BackTop,
    LoginModal,
  },
  created() {
    this.$store.dispatch('home/getSiteInfo')
    window.addEventListener('scroll',()=>{
      this.$store.state.scrollTop =  window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0
    })
    console.log('kk',process.env);
  }
}


</script>

<style lang="scss">

// @import url(//at.alicdn.com/t/c/font_4004562_v1q8kagur8h.css);


body {
  margin: 0;
  overflow-y: scroll !important;
  overflow-x: hidden;
  width: 100%;
  /* 背景渐变 */
  background: linear-gradient(90deg, rgba(247, 149, 51, .1), rgba(243, 112, 85, .1) 15%, rgba(239, 78, 123, .1) 30%, rgba(161, 102, 171, .1) 44%, rgba(80, 115, 184, .1) 58%, rgba(16, 152, 173, .1) 72%, rgba(7, 179, 155, .1) 86%, rgba(109, 186, 130, .1));
}

#app {
  position: relative;
}

.page-container {
  min-height: 100vh;
}

html.still {
  overflow: hidden;
}

</style>
